package com.lq.ecoldchain.util

import android.content.Context
import android.support.v7.app.AlertDialog
import android.view.LayoutInflater
import android.widget.TextView
import com.lq.ecoldchain.R

/*
*2019/1/5 0005  18:45
*function by lq
*/
object DialogUtils{

    interface confirmCallback{
        fun confrim()
    }


    fun updateSuccess(context:Context,callback:confirmCallback){
        val view = LayoutInflater.from(context).inflate(R.layout.dialog_update_success,null)
        AlertDialog.Builder(context).setView(view).create().show()
        view.findViewById<TextView>(R.id.dialog_confirmTv).setOnClickListener {
            callback.confrim()
        }
    }
}